/* $Id: bitmap.h 16 2006-12-16 15:37:49Z judas $ */

#ifndef NIH_BITMAP_H
#define NIH_BITMAP_H 1

#include <nih/cdefs.h>

BEGIN_C_DECLS

#include <sys/types.h>

struct nih_bitmap {
	unsigned char *value;
	size_t len;
	void *udata;
};

extern struct nih_bitmap *nih_bcreate(size_t len);

extern int nih_bresize(struct nih_bitmap *bitmap, size_t newlen);

extern int nih_bset(struct nih_bitmap *bitmap, size_t n);

extern int nih_bget(const struct nih_bitmap *bitmap, size_t n, int *value);

extern int nih_bdestroy(struct nih_bitmap *bitmap);

END_C_DECLS

#endif /* NIH_BITMAP_H */

